home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 1 / PC Actual CD 01.iso / share / dos / progr / micro_c.arj / MISCINFO < prev    next >
Encoding:
Text File  |  1993-10-05  |  10.1 KB  |  196 lines

  1.                     ** Common Questions and Answers  **
  2.                     ** About MICRO-C, XASM and EMILY **
  3.  
  4. Q: Is MICRO-C a full ANSI compiler?
  5.  
  6.     No, MICRO-C is a "subset" compiler. It does however, support much more
  7.     of the 'C' language than most other subset compilers, including:
  8.  
  9.     - All 'C' statements:
  10.         if/else     while   do/while    for     break   continue
  11.         return      goto    switch/case/default {}      ;
  12.  
  13.     - All 'C' operators:
  14.        +  -  *  /  %  &  |  ^  <<  >>  >  <  == ~ ++ -- ?: , . ->
  15.        += -= *= /= %= &= |= ^= <<= >>= >= <= != ! () [] sizeof
  16.  
  17.     - The following data types:
  18.         int     char    unsigned    (including: unsigned char)
  19.         struct  union   extern  static  register
  20.         *(pointer to any type, incl. pointers and structs)
  21.         - Arrays of any type (incl. multi-dimension, pointers & structs)
  22.         - Function can return any type
  23.         - Typecast of symbols to other types
  24.  
  25.     - Decimal, Octal and Hex constants. eg: 127, 0177, 0x7f
  26.  
  27.     - Inline assembly code (single or multi statement).
  28.  
  29.     - Full support for strings and character constants: ('' "")
  30.         \n   -Newline           \r   -Carriage return   \t   -Tab
  31.         \b   -Backspace         \f   -Formfeed  
  32.         \177 -Octal constants   \x7F -Hexidecimal constants
  33.       (16 bit character constants are supported. eg: 'ab')
  34.  
  35.     - Preprocessor commands:
  36.         #define     (fully parameterized & multi-line)
  37.         #undef
  38.         #forget     (multi undef -similar to FORTH forget)
  39.         #include
  40.         #ifdef/#ifndef/#else/#endif (fully nested)
  41.         #file       (sets filename displayed in error messages)
  42.  
  43.     - It DOES NOT support:
  44.         Typedef, Long / Double / Float / Enumerated data types, Bit fields.
  45.  
  46. Q: Is MICRO-C just another version of SMALL-C?
  47.  
  48.     No, MICRO-C is a completely new design, with several advantages:
  49.       - Supports more of the 'C' language: unsigned int & char, pointers to
  50.         pointers, arrays of pointers, multi-dim arrays, typecasting, sizeof,
  51.         parameterized and multi-line defines, multiple code generators...
  52.       - Much more efficent code generated. For a given function, MICRO-C
  53.         usually produces 1/3 to 1/2 the amount of code that SMALL-C does.
  54.       - Faster compilation: MICRO-C employs a fully tokenized parser,
  55.         which results in MUCH faster compilation than SMALL-C.
  56.       - More portable: MICRO-C was designed from the beginning to be
  57.         portable to many machine architectures.
  58. Q: Does MICRO-C run on a (Macintosh, UNIX box, etc...)?
  59.  
  60.     Although MICRO-C is distributed mainly for the IBM PC, the compiler can
  61.     be re-compiled to run in virtually any environment. The sources to the
  62.     compiler are in 'C', and were written to be very portable. You will need
  63.     a 'C' compiler for the target system. If you don't already have a cross
  64.     assembler for the target system, you can purchase the source to our XASM
  65.     assemblers, and re-compile them to the target as well.
  66.  
  67.     Note: If you are really ambitious (or desparate!), you can port MICRO-C
  68.     to a system without a 'C' compiler, by first porting MICRO-C into a cross
  69.     compiler for the target system, and using it to re-compile itself!
  70.     
  71. Q: Does MICRO-C output assembly or object code?
  72.  
  73.     MICRO-C outputs assembly language code. A command line options allows
  74.     you in include the 'C' source code as comments.
  75.     
  76. Q: Can I use my own assembler with MICRO-C, or do I need XASM?
  77.  
  78.     The code generators that we supply for MICRO-C are designed to be
  79.     compatible with our XASM cross assemblers. In most cases, they can
  80.     be modified to work with another assembler with little difficulty.
  81.  
  82.     Beginning with version 3.0 of MICRO-C, we are now including the
  83.     source code to the assembler as part of each porting package, so
  84.     you shouldn't have to worry about it. If you do have a compelling
  85.     reason to use a different assembler, it can be done.
  86.  
  87. Q: What if my assembler doesn't support a linker?
  88.  
  89.     The MICRO-C package includes SLINK, a "SOURCE LINKER", which allows
  90.     the 'C' library to be properly implemented even if your system does
  91.     not have an object linker. SLINK uses "directives" inserted in the
  92.     output file by the compiler to include library files that contain
  93.     functions or variables that you have accessed BEFORE your program
  94.     is assembled. SLINK only includes those files that are necessary,
  95.     and automatically "adjusts" local labels to be unique in each file.
  96.  
  97.     SLINK is very fast. If your assembler is reasonably quick, you will
  98.     get total compile times that are similar to what you would get with
  99.     a conventional object linker. A nice thing about this approach to
  100.     linking, is that you can get an assembly language listing for the
  101.     ENTIRE program (including start-up code and library functions).
  102.  
  103.                                                                 --- Over --->
  104. Q: How much code can I fit in (nK) of memory?
  105.  
  106.     That depends on so many factors that its impossible to give you a general
  107.     answer. It is usually more that you would think, because MICRO-C produces
  108.     fairly compact code. This is especially true with our "Developers Kits",
  109.     because their libraries are hand-coded in assembly language, using very
  110.     tight code. Here are some examples of appications:
  111.  
  112.     MICRO-C Compiler (compiled itself!)                     24K
  113.     ANSI terminal with built in XMODEM file transfer        10K
  114.     Combination lock (rotary encoder, led indicator)        2K
  115.     Telephone "distinctive ring" switcher (1 - 3 lines)     1.5K
  116.  
  117. Q: Does MICRO-C support the (insert favorite processor)?
  118.  
  119.     See the CATALOG for a list of processors which we directly support.
  120.  
  121.     If your processor is based one of the processors listed in our CATALOG
  122.     (such as 8051 variants, which have additional SFR's etc.), you should
  123.     have no problem using MICRO-C, because the compiler uses the basic CPU
  124.     instruction set, and you can easily add library functions and/or register
  125.     definitions to allow you to access the additional features.
  126.  
  127.     If you wish to use MICRO-C on a processor which is not based on one of
  128.     the ones we support, you can still do so, with a bit more work. You would
  129.     have to "port" the compiler by writing a code generator for the particular
  130.     processor you have in mind. The MICRO-C documentation includes a detailed
  131.     section on how to "port" the compiler, however this is not a task for the
  132.     novice 'C' programmer. Before attempting this, please check with us. We
  133.     may already be planning a release for the processor you want (or perhaps
  134.     you can "convince" us that is would be a good idea).
  135.  
  136. Q: Is MICRO-C really as good as you say it is?
  137.  
  138.     Sturgeons Rule has it that 90% of science fiction is junk. A similar rule
  139.     applies to PC software, but I'd say that 90% is a lower bound. Once in a
  140.     while, though, you find a product that makes up for the rest...
  141.     If price has kept you out of the microcontroller C market, you have no
  142.     further excuses. Micro-C is as good as it gets!
  143.                                     - Circuit Celler INK Dec91/Jan92
  144.  
  145.     I just obtained Micro C, and I'm very impressed!...
  146.     The portability of Micro C is second-to-none, as is it's professionally
  147.     written code and overall usability... I need to emphasize here that
  148.     Micro C is by far the best coded compiler I've ever seen. This excellent
  149.     code quality extends throughout all associated modules.
  150.                                     - FIDOnet 'C' programmers echo
  151.  
  152.     Dave, Thanks for responding to the minor problem I had with your
  153.     wonderful little compiler.
  154.                                     - A satisifed customer
  155. Q: How does EMILY51/52 compare with a hardware In Circuit Emulator (ICE)?
  156.  
  157.     EMILY is a very fast simulator (>150,000 insts/sec on my 386/25),
  158.     however it is not as fast as an ICE which operates at full CPU speed.
  159.  
  160.     My tests have shown EMILY on my machine to be roughly equivalent to a 4Mhz
  161.     8052. For example, one my customers recently reported that an algorithm
  162.     he had calculated would take about 1 second on a 12Mhz 8052 took 3 seconds
  163.     under EMILY. In contrast, the same program took over 20 MINITES when run
  164.     with another popular commercial simulator.
  165.  
  166.     EMILY with its Hardware Emulation option permits access to the timers and
  167.     I/O ports of the hardware, however external memory on the target system
  168.     cannot be accessed (EMILY provides its own code and data areas using the
  169.     PC's memory). This is usually only important if you have hardware which
  170.     is accessed through the external memory address space.
  171.  
  172.     At present, EMILY does not act on interrupts from the target system, but
  173.     allows you to simulate them from the PC keyboard. When an interrupt is
  174.     simulated, EMILY sets any hardware bits which would normally be set when
  175.     the interrupt occurs, and then vectors to the interrupt handler. Although
  176.     this prevents you from using "real time" interrupts, I have found it to be
  177.     a very effective approach when debugging interrupt handlers. You can stop
  178.     the simulation at any point, inject an interrupt, and then step through the
  179.     interrupt handler etc.
  180.  
  181.     EMILY has a 4095 instruction traceback buffer which operates in all
  182.     execution modes, however it only records the instructions executed. In
  183.     other words, you can scroll/search through the last 4095 instructions
  184.     which were executed in order to see "how it got here". More expensive
  185.     ICE's often have traceback buffers which record both the address and
  186.     data bus activity.
  187.  
  188.     EMILY is much less expensive then any ICE.
  189.  
  190.     EMILY now includes MONICA, a PC hosted debugger, that debugs ON-CHIP,
  191.     by downloading your code, and controlling it through the a tiny on-
  192.     board kernal program. MONICA's user interface is virtually identical
  193.     to EMILY's, and the kernal is upward compatible with EMILY. This means
  194.     that you can easily switch back and forth between EMILY and MONICA, and
  195.     use whichever is best suited to the debugging at hand.
  196.